package com.system.arrangement.feign;

import com.system.arrangement.been.Depart;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @author 林
 */
@FeignClient(value = "depart-service", path = "/depart")
public interface DepartServiceFeign {
    @PostMapping("/save")
     boolean saveHandle( Depart depart);

    @DeleteMapping("/del/{id}")
     boolean deleteHandle(@PathVariable("id") int id);

    @PutMapping("/upd")
     boolean updateHandle( Depart depart);

    @GetMapping("/get/{id}")
     Depart getHandle(@PathVariable("id") int id);

    @GetMapping("/get/list")
     List<Depart> listHandle();

    @GetMapping("/getAllParent/list")
     List<Depart> listParentHandle();

    @GetMapping("/getChild/{id}")
     List<Depart> listChildHandle(@PathVariable("id") int id);

    @GetMapping("/getDepartName/{id}")
     String getDepartName(@PathVariable("id") int id);
}
